<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>资讯列表</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" href="../../layui/css/layui_v2.1.5.css" media="all"/>
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="//at.alicdn.com/t/font_tnyc012u2rlwstt9.css" media="all" />
    <link rel="stylesheet" href="../../css/style.css" media="all" />

    <style type="text/css">
        .label_1{
            background: #35C6D1;
            height: 22px;
            line-height: 22px;
            padding: 0 8px;
            font-size: 12px;
            color: #fff;
            border-radius: 3px;
            position: relative;
        }

        .close{
            position: absolute;
            top: -4px;
            right: -4px;
            color: #a6a6a6;
            box-shadow: 0 0 5px #000000;
            display: inline-block;
            width: 10px;
            height: 10px;
            line-height: 10px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
        }

    </style>
</head>

<body class="childrenBody">
<blockquote class="layui-elem-quote activity_search">
    <form class="layui-form">
        <div class="layui-form-item" style="margin-bottom: 0px;">
            <div class="layui-inline">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-inline">
                    <input type="text" value="" placeholder="请输入标题..." class="layui-input search_input" id="search_input"/>
                </div>
            </div>


            <div class="layui-inline">
                <label class="layui-form-label">发布起始</label>
                <div class="layui-input-inline">
                    <input type="text" placeholder="起始时间..." class="layui-input linksTime" lay-verify="date" onclick="layui.laydate({elem:this})" id="startTime"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">发布截止</label>
                <div class="layui-input-inline">
                    <input type="text" placeholder="结束时间..." class="layui-input linksTime" lay-verify="date" onclick="layui.laydate({elem:this})" id="endTime"/>
                </div>
                <a class="layui-btn search_btn" id="searchBtn">查询</a>
            </div>
        </div>
    </form>
</blockquote>
<div class="layui-form" id="activitys_list">

    <style>
        .nav-type{
            background: #ff00f7;
            padding:2px 5px;
            color: #fff;
            font-size:12px;
            border-radius: 3px;
        }
    </style>

    <div type="text/css" th:replace="fragment/fragment::infoStyle"></div>

    <div class="layui-fluid info-list" id="activityListTb">

    </div>


</div>
<div id="pagination">
</div>



<script type="text/html" id="activityList">
    {{if list != null}}
    {{each list as value i}}
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md6 cover-img">
                    <img src="{{value.coverUrl}}" alt="cover"/>
                </div>
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md6">
                    <div class="{{if value.isShow == 1}} info layui-disabled{{else}} info {{/if}}">
                        <p>
                                <span style="cursor:pointer" class="layui-show-md-inline-block title" aId="{{value.id}}" title="点击查看详情">
                                {{value.title}}
                                </span>
                        </p>
                        <p>
                            状态：
                            {{if value.status == 0}}
                            <span class="layui-show-md-inline-block status label_1">草稿</span>
                            {{else if value.status == 1}}
                            <span class="layui-show-md-inline-block status label_1">待审核</span>
                            {{else if value.status == 2}}
                            <span class="layui-show-md-inline-block status label_1">审核通过</span>
                            {{else if value.status == 3}}
                            <span class="layui-show-md-inline-block status label_1">审核未通过</span>
                            {{else if value.status == 4}}
                            <span class="layui-show-md-inline-block status label_1">已发布</span>
                            {{else if value.status == 5}}
                            <span class="layui-show-md-inline-block status label_1">已结束</span>
                            {{else}}
                            <span class="layui-show-md-inline-block status label_1">!!!!</span>
                            {{/if}}
                        </p>
                        <p>
                            <span class="layui-show-md-inline-block">创建时间：{{value.createTime}}</span>
                        </p>
                        <p>
                            <span class="layui-show-md-inline-block">发布时间：{{value.publishTime}}</span>
                        </p>
                        <p>
                            <span class="layui-show-md-inline-block">截止日期：{{value.deadlineTime}}</span>
                        </p>
                        <p>
                        {{if value.status != 4}}

                            <button class="layui-btn layui-btn-danger layui-btn-small delBtn" aId="{{value.id}}">删除</button>

                        {{/if}}
                        {{if value.status == 1}}
                            <button class="layui-btn layui-btn-normal layui-btn-small publishBtn" aId="{{value.id}}" >发布</button>
                            <button class="layui-btn layui-btn-danger layui-btn-small refuseBtn" aId="{{value.id}}" >拒绝</button>
                        {{/if}}
                            <button class="layui-btn layui-btn-danger layui-btn-small underBtn" aId="{{value.id}}" >下架</button>
                            <button class="layui-btn layui-btn-normal layui-btn-small upBtn" aId="{{value.id}}" >上架</button>
                        </p>
                        <!--<p>-->
                        <!--<button class="layui-btn layui-btn-primary layui-btn-small" id="introBtn">推荐</button>-->
                        <!--<button class="layui-btn layui-btn-small" id="sendBtn">推送</button>-->
                        <!--&lt;!&ndash;<button class="layui-btn layui-btn-normal layui-btn-small" id="autho">用户授权</button>&ndash;&gt;-->
                        <!--<button class="layui-btn layui-btn-warm layui-btn-small" id="revokeBtn">撤回重审</button>-->

                        <!--</p>-->
                    </div>
                </div>
            </div>
        </div>
        <!--<div class="layui-col-md4">-->

        <!--</div>-->
    </div>
    {{/each}}
    {{else}}
    <div class="layui-row">
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">暂无数据!</div>
    </div>
    {{/if}}
</script>



<script type="text/javascript" src="../../layui/layui.js"></script>
<script type="text/javascript" src="../../js/activity/activityList.js?version=1.0.1"></script>
<script type="text/javascript" src="../../js/common/template.js"></script>



<script type="text/javascript">
    // 注册方法
    template.helper("subString",function (str){
        if(str==null||str==""||str==undefined){
            return "";
        }
        var _str = str.split("@@@@");
        return _str[0];
    });

</script>

</body>
</html>